import { commonLS } from '../../utils/common'
import { UPDATE_COLLAPSED_TYPE } from './types'

const actions = {
  handleToggleCollapsed() {
    const [err, collapsed] = commonLS.get('collapsed')
    commonLS.put('collapsed', err ? true : !collapsed)
    return { type: UPDATE_COLLAPSED_TYPE }
  },
}

export default actions;
